<?php

use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index');
    //验证门票
    $router->post('/order/{out_trade_no}/inspectTicket','OrderController@inspectTicket');
    //发放门票
    $router->post('/order/{comboOrderId}/sendTicket','OrderController@sendTicket');
    //支付订单
    $router->get('/order','OrderController@index');
    $router->get('/order/{comboOrder}','OrderController@detail');
    $router->post('/order/{comboOrder}/refund','OrderController@refund')->name('order.refund');
    //订单统计
    $router->get('/orders/total','OrderController@total');
    //财务统计
    $router->get('/userWithdraw','UserWithdrawController@index');
    //个人提现
    $router->get('/withdraw/{member_id}','WithdrawController@userWithdraw')->name('withdraw.user');
    //用户提现
    $router->get('/withdraw','WithdrawController@index');
    //用户列表
    $router->resource('/user',UserController::class);
    //微信自定义菜单
    $router->get('/wechat/menu','WechatMenuController@index');
    $router->post('wechat/save','WechatMenuController@save');
    //套餐兑换码
    $router->resource('/exchange',ComboExchangeController::class);
    //用户兑换记录
    $router->resource('/member_exchange',MemberExchangeController::class);


});
